package com.ruoyi.service.impl;
import com.ruoyi.domain.SupplierInfo;
import com.ruoyi.mapper.SupplierInfoMapper;
import com.ruoyi.service.ISupplierInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SupplierInfoServiceImpl implements ISupplierInfoService {
    @Autowired
    SupplierInfoMapper supplierInfoMapper;

    @Override
    public List<SupplierInfo> list() {
        return supplierInfoMapper.selectList();
    }

    @Override
    public List<SupplierInfo> listForPage(SupplierInfo supplierInfo) {
        return supplierInfoMapper.selectListForPage(supplierInfo);
    }

    @Override
    public SupplierInfo getById(Long id) {
        return supplierInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int save(SupplierInfo supplierInfo) {
        return supplierInfoMapper.insertSelective(supplierInfo);
    }

    @Override
    public int updateById(SupplierInfo supplierInfo) {
        return supplierInfoMapper.updateByPrimaryKeySelective(supplierInfo);
    }

    @Override
    public int removeByIds(Long[] ids) {
        return supplierInfoMapper.deleteByPrimaryKeys(ids);
    }
}
